home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / NEWSOFT / AUGUST / WORKDISC / !Forthmacs / risc_os / Tcl / setup < prev    next >
Text File  |  1997-07-22  |  4KB  |  126 lines

  1. set fonts(n) Trinity.Medium
  2. set fonts(i) Trinity.Medium.Italic
  3. set fonts(b) Trinity.Bold
  4. set fonts(t) Corpus.Medium
  5. set fonts(a) Sassoon.Primary
  6.  
  7. set colours(red) 255:0:0
  8. set colours(green) 0:255:0
  9. set colours(blue) 0:0:255
  10. set colours(yellow) 255:255:0
  11. set colours(cyan) 0:255:255
  12. set colours(magenta) 255:0:255
  13. set colours(white) 255:255:255
  14. set colours(black) 0:0:0
  15. set colours(grey) 127:127:127
  16.  
  17. # define some global variables
  18. set line ""
  19. set fid 0
  20. set win 0
  21. set licencename ""
  22. set licencedate "010195"
  23. set searchname ""
  24.  
  25. # The next lines define global flags that could be set to 1
  26. # if the option should be on at start
  27. set debugflag 0
  28. set traceflag 0
  29. set profileflag 0
  30. set clockflag 0
  31. set serialflag 0
  32. set blockflag 0
  33. set optimizerflag 0
  34. set compatibleflag 0
  35. set w_file "risc_os\.auto"
  36. set binsizevar "Large"
  37. set Licence "Evaluation Version"
  38. set docdriver "ASCII"
  39.  
  40. # these variables are set according to the !Forthmacs system status and control greying in the menus
  41. set meta 1;    if {[file exists Forthmacs:meta.arm.target]}        {set meta 0}
  42. set docs 1;    if {[file exists Forthmacs:docs.formatt.format]}        {set docs 0}
  43. set develop 1; if {[file exists Forthmacs:private.develop]}        {set develop 0}
  44.  
  45. if {[file exists Forthmacs:private.Licence]}\
  46.   { set fid [open Forthmacs:private.Licence]; set Licence [gets $fid]; close $fid}
  47.  
  48.  
  49. # function declarations
  50. proc setoptions {}\
  51. { global compatibleflag debugflag traceflag profileflag clockflag serialflag blockflag optimizerflag
  52.   global binsizevar docdriver
  53.   system "seteval Forthmacsoptions 0"
  54.   if {$binsizevar == "Large"} {system "seteval Forthmacsoptions 4096"}
  55.   if {$docdriver  == "LaTeX"} {system "seteval Forthmacsoptions Forthmacsoptions +  8192"}
  56.   if {$docdriver  == "HTML"}  {system "seteval Forthmacsoptions Forthmacsoptions + 16384"}
  57.   system "seteval Forthmacsoptions Forthmacsoptions +       $compatibleflag"
  58.   system "seteval Forthmacsoptions Forthmacsoptions +   2 * $debugflag"
  59.   system "seteval Forthmacsoptions Forthmacsoptions +   4 * $traceflag"
  60.   system "seteval Forthmacsoptions Forthmacsoptions +   8 * $serialflag"
  61.   system "seteval Forthmacsoptions Forthmacsoptions +  16 * $blockflag"
  62.   system "seteval Forthmacsoptions Forthmacsoptions +  32 * $profileflag"
  63.   system "seteval Forthmacsoptions Forthmacsoptions +  64 * $clockflag"
  64.   system "seteval Forthmacsoptions Forthmacsoptions + 128 * $optimizerflag"
  65.   system "set Forthmacsoptions <Forthmacsoptions>"
  66. }
  67.  
  68. proc archive         {list} {system "archive $list"}
  69. proc update-archive     {list date } {system "+archive $list $date"}
  70. proc doexit {}\
  71. { system "Unset ForthmacsTcl"
  72.   system "Unset Forthmacsoptions"
  73.   exit
  74.  
  75. proc binary {bin}\
  76. { global binsizevar
  77.   setoptions
  78.   if {$binsizevar == "Large"} {system "Forthmacs:risc_os.bin.run.$bin"}
  79.   if {$binsizevar == "Small"} {system "Forthmacs:risc_os.bin.run.s$bin"}
  80. }
  81.  
  82. proc compiler {bin}\
  83. { global binsizevar
  84.   setoptions
  85.   if {$binsizevar == "Large"} {system "Forthmacs:risc_os.bin.load.$bin"}
  86.   if {$binsizevar == "Small"} {system "Forthmacs:risc_os.bin.load.s$bin"}
  87. }
  88.  
  89. proc runforth {file}\
  90. { global binsizevar
  91.   setoptions
  92.   if {$binsizevar == "Large"} {system "Forthmacs:risc_os.bin.run.fForth $file"}
  93.   if {$binsizevar == "Small"} {system "Forthmacs:risc_os.bin.run.sfForth $file"}
  94. }
  95.  
  96. proc clickproc {button}\
  97. { if {$button == "s"} {system "Filer_OpenDir <Forthmacs\$Dir>"}
  98.   if {$button == "a"} {runforth risc_os.auto}
  99. }
  100.  
  101. proc showfile {fname}\
  102. { global line fid win
  103.     set fid [open $fname]
  104.     w_text win$win create -title $fname -width 1200.OS -size 13p
  105.     w_text win$win options -l.1i
  106.     while {![eof $fid]} { set line [gets $fid]; w_text win$win print $line}
  107.     close $fid; w_text win$win open; incr win
  108. }
  109.  
  110. proc makelicence {name date}\
  111. {  global fid
  112.    system "Copy Forthmacs:private.licence <Forthmacs\$Dir>.private.licence+ ~V~CFD"
  113.    set fid [open <Forthmacs\$Dir>.private.licence w];puts $fid $name;close $fid
  114.    update-archive WorkDiscR $date
  115.    system "Copy Forthmacs:private.licence+ <Forthmacs\$Dir>.private.licence ~V~CFD"
  116. }
  117.  
  118. proc search {name}\
  119. {  system "set tmp\$word $name"
  120.    system "set Forthmacsdocstyle ASCII"
  121.    system "Forthmacs:risc_os.bin.search"
  122.    showfile "Forthmacs:docs.html.searchfile"
  123.    system "unset Forthmacsdocstyle"
  124. }
  125.